<template>
    <div>
        <!-- 顶部 -->
        <div class="header">
            <div class="open">
                <span v-if="isCollapse" class="iconfont icon-zhankai-01" @click="openMenu"></span>
                <span v-else class="iconfont icon-zhedie-01" @click="openMenu"></span>
            </div>
        </div>
        <!-- 右侧内容 -->
        <div>
          <PageTab></PageTab>
          <keep-alive>
            <div style="background-color: white" >
              <router-view/>
            </div>
          </keep-alive>
        </div>
    </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import PageTab from '../components/PageTab.vue';

export default defineComponent({
  props: ['isCollapse'],
  methods: {
    openMenu() {
      this.$emit('changeShow');
    },
  },
  components: {
    PageTab,
  },
});
</script>

<style lang="scss" scoped>
.header{
    height: 50px;
    background-color: #f5f5f5;
    color: #333;
    padding: 4px;
    box-sizing: border-box;
    .open{
        height: 50px;
        line-height: 50px;
        background-color: #fff;
        .iconfont{
            font-size: 18px;
        }
    }
}
</style>
